using System;
using System.Collections.Generic;

using Sc.Domain.Interfaces;

namespace SC.Infrastructure.Persistence.Interfaces
{
	public interface IRepository<T> : ICollection<T> where T : class, IEntity
	{
		IEnumerable<T> Query(Func<T, bool> predicate);
		T GetSingle(Func<T, bool> predicate);
		void Update(T entity);
		void Attach(T entity);
		void InserOrUpdate(T entity);
	}
}